home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 2 / Gold Medal Software Volume 2 (Gold Medal) (1994).iso / utils / batkit50.arj / BATKIT.DOC < prev    next >
Text File  |  1988-08-23  |  33KB  |  700 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.                                       BatKit
  12.  
  13.                                    Utilities for
  14.                                Menus in Batch Files
  15.  
  16.                                         by
  17.  
  18.                                     Ken Hipple
  19.                                    [74076,2331]
  20.                                 All Right Reserved
  21.  
  22.                       [Including: GetKey, SaveDir, and Wait]
  23.  
  24.  
  25.                                  Copyright 1988 by
  26.                      Mississippi Data Equipment Company, Inc.
  27.                              625C Lakeland East Drive
  28.                                 Jackson, MS   39208
  29.                                   (601) 932-6332
  30.  
  31.  
  32.  
  33.      BatKit   ver. 5.0                7/15/88                         Page: 2
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.                          T A B L E   O F   C O N T E N T S
  42.  
  43.  
  44.      GETKEY  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .    3
  45.        OVERVIEW  . . . . . . . . . . . . . . . . . . . . . . . . . . . .    3
  46.        USING GETKEY  . . . . . . . . . . . . . . . . . . . . . . . . . .    4
  47.           Usage
  48.           Response Editing
  49.        COMMAND LINE PARAMETERS . . . . . . . . . . . . . . . . . . . . .    5
  50.        DISPLAYING TEXT . . . . . . . . . . . . . . . . . . . . . . . . .    8
  51.           # control character
  52.           @ control character
  53.  
  54.      GETKEY 4.x AND GETSTRNG COMPATIBILITY . . . . . . . . . . . . . . .   11
  55.  
  56.      WAIT  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   12
  57.  
  58.      SAVEDIR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   13
  59.  
  60.      USING THE DOS ENVIRONMENT . . . . . . . . . . . . . . . . . . . . .   14
  61.  
  62.      REGISTERING BatKit  . . . . . . . . . . . . . . . . . . . . . . . .   15
  63.  
  64.  
  65.  
  66.      BatKit   ver. 5.0                7/15/88                         Page: 3
  67.  
  68.  
  69.  
  70.      GETKEY OVERVIEW:
  71.  
  72.        GetKey is a utility program designed to be used in a batch file.  Its
  73.      main function is to make batch files interactive by allowing the user to
  74.      enter a response to a prompt or question.  Used with an appropriate text
  75.      file and batch file it can be the basis of a menu system.  Other uses
  76.      include displaying text files and messages, playing tones, clearing
  77.      screens larger than 80x25, and providing a 'hidden' escape method from a
  78.      batch file.
  79.  
  80.        GetKey enables you to use a single batch (BAT) file and a single text
  81.      file to completely control the operation of a system from startup to
  82.      shutdown.
  83.  
  84.        GetKey has been tested with DOS versions from 2.1 to 3.3.  It will run
  85.      on most IBM PCs and compatibles.  Features of GetKey include:
  86.  
  87.       - Returns an ERRORLEVEL for all    - Option to wait for RETURN key
  88.         keys including function keys       before accepting a response
  89.  
  90.       - Option to insert response        - Can wait a given time for a
  91.         into the environment               response and then continue
  92.  
  93.       - Fast text display & screen       - Can display a file, message or
  94.         handling                           both
  95.  
  96.       - Optional response echoing        - Can display a section of a file
  97.  
  98.       - Optional bad response message    - Flexible color handling 
  99.  
  100.       - Option to delete bad responses   - Time and date display options
  101.       
  102.       - Optional beep on bad response    - Does display delays and pauses
  103.       
  104.       - Built-in help screens            - 'Smart' clear screen function
  105.  
  106.       - Clear type-ahead buffer option   - Limited screen mode switching 
  107.  
  108.       - Tone generation capabilities     - Optional response validation
  109.  
  110.       - Adjustable max. response length  - Can trim spaces from response
  111.  
  112.       - Option to force uppercase        - Defaults can be modified
  113.  
  114.  
  115.  
  116.      BatKit   ver. 5.0                7/15/88                         Page: 4
  117.  
  118.  
  119.      USING GETKEY:
  120.  
  121.         When GetKey is run it first displays any file or message specified,
  122.      then waits for the user to enter a response.  You can specify the
  123.      maximum length allowed.  After the response is entered it is validated
  124.      if necessary.  The ASCII value of the first letter of the response is
  125.      then returned to the batch file in ERRORLEVEL.  The response can also be
  126.      placed into the environment if you want.  The values returned by func-
  127.      tion keys are their extended ASCII value plus 128.  These values are: 
  128.  
  129.                          F1-F10    SHIFT F1-F10   CTRL F1-F10   ALT F1-F10
  130.      Value Returned:     187-196     212-221        222-231      232-241
  131.  
  132.      Usage:
  133.        GetKey  [?] [/A] [/B] [/C] [/D] [/E] [/F"filename[@s]"] [/G["char"]]
  134.                [/H] [/I] [/K"chars" | /KF"filename[@s]"] [/Lnnn] [/M"msg"]
  135.                [/N["char"]] [/O] [/P] [/R] [/S] [/T] [/U] [/V["var"]]
  136.                [/Wnnnn] [/X] [/Z]
  137.  
  138.      Items in [] are optional.  The character | means or (for example, you
  139.      can use /K or /KF but not both together).  Most parameters can have a +
  140.      or - appended to them (ex. /B- or /G+"*").  See below for which para-
  141.      meters can use this.  Note that any place GetKey expects a number you
  142.      may enter it in decimal or hexadecimal.  To use hexadecimal add a & in
  143.      front of the number.  For example, to GetKey &A0 is the same as 160.
  144.      Arguments enclosed in quotes (") above MUST be enclosed in quotes on
  145.      the command line.
  146.  
  147.      Response Editing:
  148.  
  149.      The following keys can be used during response entry for editing:
  150.  
  151.      Home -         Returns the cursor to the first character of the
  152.                     response.
  153.  
  154.      End -          Moves the cursor to the right end of the response.
  155.  
  156.      Left Arrow -   Moves the cursor one space to the left.
  157.  
  158.      Right Arrow -  Moves the cursor one space to the right.
  159.  
  160.      Ins -          Toggles Insert/Overstrike mode.  Insert mode is indicated
  161.                     by a large cursor.
  162.  
  163.      Del -          Deletes the character under the cursor.
  164.  
  165.      BackSpace -    Deletes the character to the left of the cursor.
  166.  
  167.      Esc -          Deletes the entire response.
  168.  
  169.  
  170.  
  171.      BatKit   ver. 5.0                7/15/88                         Page: 5
  172.  
  173.  
  174.  
  175.      COMMAND LINE PARAMETERS for GetKey: (The value in [] after some defini-
  176.      tions is the "initial" default for that parameter.  That is, the action
  177.      for that parameter if the switch is not included in the command line. 
  178.      If the default is [off], the switch would change it to ON.  Most of
  179.      these initial defaults can be changed by using the /O switch to patch
  180.      GETKEY.EXE.  Toggles can also be forced ON or OFF using + or -.)
  181.  
  182.      /A  - Makes the RETURN key be one of the Acceptable responses for GetKey
  183.            (see /K and /KF).  If not used with the /K|/KF parameter it makes
  184.            the RETURN key be the only acceptable response. [off]
  185.  
  186.      /B  - Toggles the setting for the error Beep produced by an invalid
  187.            response to GetKey (see /K|/KF) and Ctrl-G beeps. [on]
  188.  
  189.      /C  - Toggles the Clear screen setting.  If no color setting has been
  190.            done the original screen colors or attributes are used; otherwise
  191.            the last color that was set is used.  GetKey determines the
  192.            original screen colors by looking at the attributes at the cursor
  193.            position that was current when GetKey was called.  This means that
  194.            the color the cursor is when you invoke GetKey is the color it
  195.            thinks the screen is. [off]
  196.  
  197.      /D  - Toggles the 'Delete (erase) unacceptable response' setting  (see
  198.            /K|/KF). [off]
  199.  
  200.      /E  - Toggles the setting for displaying an Error message when the user
  201.            enters an unacceptable response (see /K|/KF). [off]
  202.  
  203.      /F  - Causes GetKey to display the File "filename".  Using the syntax
  204.            "filename@s" causes GetKey to display only section s of the file. 
  205.            See 'Displaying Text' below for more information.
  206.  
  207.      /G  - Toggles the setting for a Guide line.  When ON, it displays a
  208.            guide line showing the length of the maximum acceptable response. 
  209.            Use /G"char" to change the character used for the line.  The
  210.            initial default is an underline [_], but this can be changed using
  211.            the /O option. [off]
  212.  
  213.      /H  - Causes the built-in Help screens to be displayed.  (also use ?)
  214.  
  215.      /I  - Toggles the 'Incompatible display adapter' setting.  When ON it
  216.            forces GetKey to use 80x25 screen.  (Known to be needed for some
  217.            AT&T adapters.) [off]
  218.  
  219.      /K  - Makes the list of characters entered ("chars") be the only accep-
  220.            table Keys for GetKey.  GetKey will not continue processing until
  221.            the user presses one of these keys.  Use this option when you are
  222.            looking for one character responses.  For multi-character respon-
  223.            ses use /KF.  When this option is used with responses of length
  224.            greater than 1 only the first character of the response is
  225.            checked.  For example, if one of the characters in "chars" is a 1
  226.            than any response starting with a 1 will be accepted.  To make a
  227.            function key or a character not on the keyboard an acceptable
  228.  
  229.  
  230.  
  231.      BatKit   ver. 5.0                7/15/88                         Page: 6
  232.  
  233.  
  234.            character, enter the appropriate value using the ALT-Numeric Key
  235.            Pad method. For example, to make F1 an acceptable key, hold down
  236.            the ALT key, press the keys 1, 8, and then 7 using the numeric key
  237.            pad and then release the ALT key.  (See /U for case sensitivity)
  238.  
  239.      /KF - Makes the responses in the file "filename" the only acceptable
  240.            responses.  Response files can be broken into sections the same as
  241.            display files using the "filename@s" syntax.  Response files must
  242.            be ASCII text files with each response delimited by a carriage
  243.            return or a carriage return/line feed.  This is the format pro-
  244.            duced by EDLIN or by doing 'COPY CON filename'.  Most word pro-
  245.            cessing packages have an option to produce this type file also. 
  246.            Be careful when using this or the /K option.  It is very easy to
  247.            get 'trapped'.  For example, your response file doesn't have any
  248.            single character responses in it and you start GetKey without
  249.            overriding its default maximum response length setting of 1.  (see
  250.            /U for case sensitivity)
  251.                                           
  252.      /L  - Sets the maximum allowable Length of the response.  nnn can be any
  253.            value from 0 to 255.  A value of 0 means that the user cannot
  254.            enter any characters.  This would make GetKey act similar to the
  255.            PAUSE command in a batch file. [1]
  256.  
  257.      /M  - GetKey displays the Message "msg" on the screen before waiting for
  258.            the user's response.
  259.  
  260.      /N  - Toggles GetKey response echoing.  Normally, when the user presses
  261.            a key, that key is displayed (if it is a displayable character). 
  262.            Use /N"char" to change the default 'fill-in' character.  For
  263.            example, if you are using GetKey to enter passwords you might like
  264.            to use the command /N"*". [on]
  265.  
  266.      /O  - Change Option's defaults.  GetKey's default settings are shown on
  267.            the first help screen as highlighted fields.  You can change these
  268.            defaults by using the /O option.  Items that can be changed are:
  269.            /B, /C, /D, /E, /G, /G"char", /I, /L, /N, /N"char", /P, /R, /S,
  270.            /T, /U, /V, /V"var", /X, and /Z.  Be careful about changing
  271.            defaults once you are using GetKey in several places.  If an
  272.            existing batch file toggles a setting, and you change that sett-
  273.            ing's default, your batch file might stop working.
  274.  
  275.      /P  - Prevents (disables) GetKey snow checking on CGA monitors.  This
  276.            will speed up screen displays, so if your CGA adapter doesn't
  277.            produce 'snow', or you don't mind it, use this option or set it
  278.            using /O.  Actually, this switch toggles the default snow checking
  279.            setting.  If you have a video adapter that GetKey thinks is not a
  280.            CGA then GetKey automatically turns snow checking off.  If this
  281.            produces 'snow' on your screen you may need to use /P. [off]
  282.  
  283.      /R  - Toggles the 'RETURN key Required' setting.  When ON, GetKey will
  284.            not act on a response until RETURN is pressed.  When OFF a
  285.            response is accepted as soon as the maximum number of characters
  286.            have been entered. [off]
  287.  
  288.  
  289.  
  290.      BatKit   ver. 5.0                7/15/88                         Page: 7
  291.  
  292.  
  293.      /S  - GetKey can be configured to add a Carriage Return-Line Feed
  294.            sequence after an accepted response.  This option toggles the
  295.            default setting. [off]
  296.  
  297.      /T  - Toggles the 'Trim leading and trailing spaces' function. [on]
  298.  
  299.      /U  - Toggles the 'force response to UPPERcase' setting.  This switch
  300.            also affects how response checking operates.  When Uppercase is
  301.            ON, response checking is NOT case sensitive.  This means that if
  302.            "Ab" is an acceptable response, a user could enter: "AB", "ab",
  303.            "Ab", or "aB", and GetKey would accept it.  When Uppercase is OFF
  304.            response checking IS case sensitive.  In this case the ONLY
  305.            acceptable response would be: "Ab". [on]
  306.  
  307.      /V  - Toggles the 'insert response into the environment' setting.  Sets
  308.            the Variable name to be used to "var".  If "var" is not used
  309.            GetKey uses the default value [GK]. [off]
  310.  
  311.      /W  - Tells GetKey to Wait for a given number of seconds before continu-
  312.            ing.  If no response is entered before the wait period is up, an
  313.            ERRORLEVEL of 0 is returned to the batch file.  /W0 is a special
  314.            situation.  When it is used, GetKey does not wait for a key to be
  315.            entered.  Unless there is a character in the buffer, an ERRORLEVEL
  316.            of 0 is returned.
  317.  
  318.      /X  - Toggles GetKey CTRL-BREAK checking during display delays, tone
  319.            generation, and text displaying.  Text displaying is much slower
  320.            with checking ON. [off]
  321.  
  322.      /Z  - Toggles the 'clear (Zap) the type-ahead buffer' function in
  323.            GetKey. [off]
  324.  
  325.  
  326.      +|- - The above options that toggle a setting can also be used to force
  327.            the setting ON or OFF by adding a + (ON) or - (OFF) to the param-
  328.            eter.  For example, /C+ forces screen clearing ON and /C- forces
  329.            it OFF.  This syntax is safer if you plan on modifying the GetKey
  330.            default settings using the /O parameter.  The toggle syntax
  331.            provides for a shorter command line entry for those users who plan
  332.            on sticking with a given GetKey setup and retains compatibility
  333.            with earlier versions of GetKey.  A + or - can be used with /A,
  334.            /B, /C, /D, /E, /G, /I, /N, /P, /R, /S, /T, /U, /V, /X, and /Z.
  335.  
  336.  
  337.  
  338.      BatKit   ver. 5.0                7/15/88                         Page: 8
  339.  
  340.  
  341.  
  342.      DISPLAYING TEXT:
  343.  
  344.         Using GetKey there are two methods of displaying text.  The /M option
  345.      can be used for short messages or prompts.  With this method you can
  346.      only display as much text as you have room for on the command line.  The
  347.      /F method allows you to display a file so the amount of text you can
  348.      display is limited only by your disk space.  Both methods can be used
  349.      together in which case the file is displayed first.  With both methods
  350.      you can perform special functions through the use of # and @ control
  351.      character sequences.  Note that all letters that are used in a control
  352.      sequence MUST be UPPER case.
  353.  
  354.         In the case where the control sequence requires a numeric argument
  355.      you can enter the argument in decimal or hexadecimal form.  To use
  356.      hexadecimal preface the number with & (ex. &1A).  You only need to enter
  357.      as many digits as you wish.  You do not need to pad the argument to its
  358.      full length with leading zeros but use caution if you don't.  The reason
  359.      is that if you don't use the full length GetKey will misinterpret what
  360.      you mean if the control sequence is immediately in front of a word
  361.      starting with A through F (when using hexadecimal) or 0 through 9. 
  362.      Example #&1Apple will be seen as the color combination #&1A followed by
  363.      the word "pple" instead of the color combination #&1 followed by the
  364.      word Apple.  Forcing control sequence letters to be entered as upper
  365.      case lessens the possibility of this but does not prevent it.
  366.  
  367.         The # control character is used specifically for screen color or
  368.      attribute control.  Hexadecimal is convenient to use for colors because
  369.      the first digit is the background setting and the second is the fore-
  370.      ground.  For example, #&10 sets the colors to a foreground color of 0
  371.      (black) and the background color to 1 (blue).  The syntax is #&hh where
  372.      &hh is a hexadecimal number.  To see all of the 256 possible
  373.      color/attribute combinations enter GetKey/f"colors" (GetKey must be able
  374.      to find the colors file for this to work) at the DOS prompt.  To display
  375.      the # character itself use ## in your message or file.
  376.  
  377.         The @ control character is used for various functions.  To display
  378.      the @ character itself use @@.  The @ control sequences are:
  379.  
  380.      @C          - Clears the screen.  This is the same as the /C command
  381.                    line parameter except that it may be used anywhere in the
  382.                    file or message.
  383.  
  384.      @CR+        - Turns the CuRsor ON.
  385.  
  386.      @CR-        - Turns the CuRsor OFF.
  387.  
  388.      @DD         - Displays the Date in the form MM/DD/YY, updated as needed.
  389.  
  390.      @DT         - Displays the Time in the form HH:MM:SS, continuously
  391.                    updated.
  392.  
  393.      @DV(var)    - Displays the environment Variable named 'var' (e.g. PATH).
  394.  
  395.  
  396.  
  397.      BatKit   ver. 5.0                7/15/88                         Page: 9
  398.  
  399.  
  400.      @H          - Homes the cursor (to upper left corner) without clearing
  401.                    the screen.  This parameter can be used to "overlay"
  402.                    screens. (see @X and @Y for other cursor positioning)
  403.  
  404.      @Ls         - Labels a section as section s, where s is any character. 
  405.                    Used with the /F"filename@s" syntax allows you to display
  406.                    sections of a file instead of the whole file.  GetKey will
  407.                    display all of the file from the start of the given
  408.                    section to the end of the file or the start of the next
  409.                    section.  Sections are found very quickly - even those
  410.                    near the end of large files.  If a file with sections is
  411.                    displayed using the syntax /F"filename", then the first
  412.                    section is displayed.  File sectioning can also be used in
  413.                    the same way for response files. (see /KF).
  414.  
  415.      @Mx         - Switches screen Modes.  x may be 0 through 7 or the letter
  416.                    O.  Use the O to return the screen to the mode it was in
  417.                    when GetKey was invoked.  Use the command with some
  418.                    caution since some of the modes won't display text.
  419.  
  420.      @O          - Returns the screen colors and attributes to the Original
  421.                    start-up values (cursor color when GetKey was executed).
  422.  
  423.      @P          - Makes GetKey Pause its displaying of text until the user
  424.                    presses a key.  The key pressed is discarded.  Useful when
  425.                    you want to display more than one screenful of text.
  426.  
  427.      @R          - Set cursor position for Response.  Normally, GetKey waits
  428.                    for input wherever the display file (or message) ends.  To
  429.                    force the user response to be entered at some other
  430.                    position on the screen, imbed @R at that point in the
  431.                    display file.
  432.  
  433.      @Snnn       - 'Shifts' the screen's colors.  The number entered is added
  434.                    to the current color at each screen position.
  435.  
  436.      @Tnnn#nnnnn - Generates a Tone.  The nnn parameter is the duration.  The
  437.                    #nnnnn parameter is the frequency.  The higher the number
  438.                    entered for the frequency, the lower the frequency.  Both
  439.                    parameters are optional, however use care when following
  440.                    an @T with a color change (#) command.  @T is the equiva-
  441.                    lent of @T2#&400.
  442.  
  443.      @Wnnnnn     - Causes GetKey to delay (Wait) the displaying of text for
  444.                    the period nnnnn.  The waiting period used is not machine
  445.                    dependent.  In other words @W10 will delay the display the
  446.                    same length of time no matter what machine it is being run
  447.                    on.  @W18 provides a delay of approximately 10 seconds. 
  448.                    The maximum value for nnnnn is 65535.
  449.  
  450.      @Xddd       - Positions the cursor to column ddd or &hh (where the
  451.                    leftmost column is 000).  Note that -ddd or +ddd positions
  452.                    the cursor ddd positions to the left or right of the
  453.                    current position.
  454.  
  455.  
  456.  
  457.      BatKit   ver. 5.0                7/15/88                        Page: 10
  458.  
  459.  
  460.  
  461.      @Yddd       - Positions the cursor to row ddd or &hh (where the top row
  462.                    is 000).  Note that -ddd or +ddd positions the cursor ddd
  463.                    rows above or below the current position.
  464.  
  465.           The text file to display a screen can be created and edited with
  466.      any ASCII text editor.  Most of ours were done with WordPerfect because
  467.      of it's convenient line drawing feature.  However, adding the # param-
  468.      eters to control colors, etc. can be tedious.  We have a utility to add
  469.      in screen preparation.  It will convert a screen image file into a
  470.      GETKEY text file automatically - MAKESCRN.  The screen image must be in
  471.      the format used by the PC Magazine PAINT program, which can be used for
  472.      creating screens from scratch.  If you have another way of painting
  473.      screens in color (or want to capture existing screens), you can use our
  474.      GETSCRN program to capture screens to an image file.
  475.  
  476.  
  477.  
  478.      BatKit   ver. 5.0                7/15/88                        Page: 11
  479.  
  480.  
  481.  
  482.  
  483.  
  484.      GETKEY 4.x AND GETSTRNG COMPATIBILITY:
  485.  
  486.        GetKey 5.0 is highly compatible with pre-5.0 versions of GetKey and
  487.      GetStrng.  5.0 is a combination of these two programs.  As shipped the
  488.      defaults for 5.0 make it work similar to older versions of GetKey.  The
  489.      following is a list of incompatibilities and differences that you need
  490.      to watch for:
  491.  
  492.        -  Default number entry is now decimal instead of hexadecimal.  It
  493.           seems a lot of people consider decimal the most natural base to
  494.           use.  A strange way of thinking but I bow to the majority in this
  495.           case.  To adapt existing files just take out the & sign where you
  496.           have it and put it in where you don't (i.e. an existing #&10 should
  497.           be changed to #10 and an existing #10 should be changed to #&10). 
  498.           If you don't care for that idea use /4 as one of your command line
  499.           arguments.  This changes the default back to hexadecimal.
  500.  
  501.        -  If you don't force responses to upper-case then lower-case letters
  502.           will return their lower-case value.  As shipped, GetKey defaults to
  503.           forced uppercase responses.
  504.  
  505.        -  The /W parameter now lets you enter the waiting period in seconds
  506.           rather than a code character that was, in some cases, obscure.
  507.  
  508.        -  The default environment variable (as shipped) is GK.  GetStrng
  509.           users take note.
  510.  
  511.        -  You can now display things in the bottom right corner of the screen
  512.           without having the screen scroll.
  513.  
  514.        -  To allow a SPACE(s) to be entered as a response you will have to
  515.           turn trimming (/T) off.  This only concerns responses consisting of
  516.           just spaces.  Embedded spaces are never removed.
  517.  
  518.        -  The following keys are now editing keys and will not return a
  519.           value: Home, End, Left Arrow, Right Arrow, Ins, Del, Esc, and
  520.           Backspace.
  521.  
  522.  
  523.  
  524.      BatKit   ver. 5.0                7/15/88                        Page: 12
  525.  
  526.  
  527.  
  528.  
  529.  
  530.      USING WAIT:
  531.  
  532.        USAGE:  WAIT [?] [/M] [/C] [/U] [/B] [time]
  533.       
  534.           where: ?  - displays help screen
  535.                  /M - turns off the waiting until message
  536.                  /C - turns ON the clock display
  537.                  /U - wait until the time given
  538.                  /B - makes delay non-interruptible
  539.                       (CTRL-BREAK is also disabled)
  540.                  time - 6 digits in HHMMSS format.  Can be entered in
  541.                         any way desired.
  542.                         Examples:  01:02:03   010203
  543.                                    01 hours 02 minutes 03 seconds
  544.  
  545.           WAIT provides a way to cause a delay in the processing of a batch
  546.      file.  The delay can be from 1 second to 23 hours 59 minutes and 59
  547.      seconds.  It may be for an amount of time or until a given time.  It can
  548.      be interruptible or non-interruptible.  If it is interruptible, then
  549.      pressing any key will exit WAIT.  If no time is entered WAIT defaults to
  550.      approximately 1 second.  If an entry error is made, a message is dis-
  551.      played, and an ERRORLEVEL of 1 is returned.
  552.  
  553.  
  554.  
  555.      BatKit   ver. 5.0                7/15/88                        Page: 13
  556.  
  557.  
  558.  
  559.  
  560.  
  561.      USING SAVEDIR:
  562.  
  563.        USAGE: SaveDir [?] [d:][dir]
  564.  
  565.           where d:  = a valid drive
  566.                 dir = a valid directory 
  567.                 ?   = display help screens 
  568.  
  569.           SaveDir places the current drive and directory path into the
  570.      environment using the variable names LDRV and LDIR.  Using the syntax
  571.      'SaveDir d:dir' will make SaveDir change to that drive & directory after
  572.      it has saved the info about the current directory.  After SaveDir is
  573.      run, the command CD %LDIR% can be used by a batch file to return to the
  574.      directory current when SaveDir was run, and %LDRV% can be used to change
  575.      to the drive that was current.  The following is an outline of a batch
  576.      file that will save the information about where it is currently at,
  577.      change to a new drive and directory, execute some commands, and then
  578.      return where it started:
  579.  
  580.           SaveDir d:dir
  581.           .
  582.           . whatever commands you want
  583.           .
  584.           %LDRV%
  585.           CD %LDIR%
  586.  
  587.      Note that the last two lines could be replaced with 'SaveDir %LDIR%'. 
  588.      The advantage to using SaveDir is that you can change drive AND direc-
  589.      tory with one command instead of the two that DOS requires.
  590.  
  591.           Error conditions will set ERRORLEVEL.  1 means there was not enough
  592.      environment space to insert LDIR.  2 means there was not enough room for
  593.      LDRV.  3 means the DOS being used is earlier than 2.0.  4 means an
  594.      invalid directory was entered and 5 means an invalid drive was entered.
  595.  
  596.  
  597.  
  598.      BatKit   ver. 5.0                7/15/88                        Page: 14
  599.  
  600.  
  601.  
  602.      USING THE DOS ENVIRONMENT:
  603.  
  604.        The environment is a section of memory reserved by DOS as a place for
  605.      information that may change, such as the path.  The information in the
  606.      environment is stored in the form varname=text where varname is the name
  607.      of the environment variable and text is the information associated with
  608.      it.  In a batch file you can use varname to access the information. 
  609.      When a batch file encounters the syntax %varname% it replaces it with
  610.      the information associated with varname.  The principal and operation
  611.      are the same as the %1 through %9 command line arguments that batch
  612.      files use.  If you want to see what you have in your environment enter
  613.      SET at the DOS prompt.  To add something to the environment enter SET
  614.      varname=text.
  615.  
  616.        One problem with using the environment is that it defaults to 160
  617.      bytes of memory.  Once it is full nothing more can be added unless
  618.      something else is removed first.  If you are using DOS 3.x this is
  619.      easily overcome by adding a command to the CONFIG.SYS file.  For DOS 3.1
  620.      use the command 'SHELL=C:\COMMAND.COM /E:paragraphs /P'.  For DOS 3.2
  621.      and later use 'SHELL=C:\COMMAND.COM /E:bytes /P'.  The difference
  622.      between the two is that DOS 3.1 wants the amount of memory to be reserv-
  623.      ed to be specified in 16 byte paragraphs and the other versions want it
  624.      specified in bytes.  If you have COMMAND.COM located somewhere other
  625.      than the root directory of drive C: then replace C:\COMMAND.COM with the
  626.      drive and path to where you do have it (example: D:\DOS\COMMAND.COM). 
  627.      The /P is needed to make AUTOEXEC.BAT execute if it is present.  If you
  628.      are using a DOS version before 3.x it is more difficult to expand the
  629.      environment.  You will need to find one of the programs that modifies
  630.      COMMAND.COM.  You can probably find one on the BBS where you found
  631.      BatKit or on CompuServe in the IBMNEW or IBMSW forums.
  632.  
  633.  
  634.      GETSCRN and MAKESCRN:
  635.  
  636.      If you want to capture screens from other programs for use with GetKey,
  637.      you would like these utilities.  GETSCRN will capture any text screen to
  638.      a file in the PC Magazine PAINT format.  This file can then be edited
  639.      with PAINT and converted to a GetKey screen file by MAKESCRN.  Although
  640.      the GetKey screen file can be created or edited by any text editor, it
  641.      is easier to create or edit screens with boxes, etc. using PAINT, which
  642.      can be downloaded from PC Magazine's PCMAGNET (on CompuServe).  A sample
  643.      of screens captured with GETSCRN and converted with MAKESCRN is included
  644.      in BATDEMO.
  645.  
  646.  
  647.  
  648.      BatKit   ver. 5.0                7/15/88                        Page: 15
  649.  
  650.  
  651.  
  652.      REGISTERING BatKit:
  653.  
  654.         You may copy and distribute this program freely, as long as all parts
  655.      of the package are included without modification.  This is a shareware
  656.      (not public domain) program; if you like it and use it on a regular
  657.      basis please register it.  Also, in each case of non-personal use it
  658.      MUST be registered.  Registered owners will receive support and notifi-
  659.      cation of updates.  To register BatKit please send $25 to:
  660.  
  661.           Mississippi Data Equipment Co.
  662.           625C Lakeland East Drive
  663.           Jackson, MS  39208
  664.           (601) 932-6332
  665.  
  666.      To receive a diskette of other assorted utilities (including GETSCRN and
  667.      MAKESCRN, a WP 5.0 version of BATKIT.DOC, and the ASM source code for
  668.      BatKit), send $29 instead of $25.  BatKit is distributed without war-
  669.      ranty, implied or otherwise.  If you have any problems with BatKit, or
  670.      if you have any comments or suggestions, please send them to the above
  671.      address, to me on CompuServe (ID# 74076,2331), or to Conrad Smith on
  672.      CompuServe (ID# 76701,107).  Conrad is a sysop on the Javelin forum (GO
  673.      JAVELIN) and will be able to respond on a more timely basis.  He helped
  674.      develop and test BatKit and suffered through daily changes and fixes, so
  675.      he knows as much about how it works as I do.
  676.  
  677.         If you distribute BatKit you must include the following files as part
  678.      of the package:
  679.  
  680.        GETKEY.EXE        The GetKey program
  681.        SAVEDIR.COM       The SaveDir program
  682.        WAIT.COM          The Wait program
  683.        BATKIT.DOC        The BatKit documentation file
  684.        DEMO.GKF          A text file that demonstrates GetKey's features. 
  685.                          Used by BATDEMO.BAT or type: GETKEY /f"DEMO.GKF".
  686.        COLOTONE.GKF      A text file that displays all possible tone and
  687.                          color/attribute combinations.
  688.        COLOTONE.BAT      A batch file that uses COLOTONE.GKF
  689.        COLORS            A text file that displays all colors.
  690.                               (use GetKey /f"colors")
  691.        MSDEMO.GKF        A text file used by BATDEMO.BAT to illustrate screen
  692.                          captures by GETSCRN and MAKESCRN.
  693.        MENU.GKF          A text file containing menus for BATDEMO.BAT
  694.        GETKEY.RSP        A text file with valid responses for BATDEMO.BAT
  695.        BATDEMO.BAT       A batch file illustrating uses of GETKEY, WAIT, and
  696.                          SAVEDIR.
  697.  
  698.      If you receive BatKit and any of these files are missing, please contact
  699.      us.
  700.